#include <stdio.h>

int main(){
int jiao=0;
int tou=0;
int ji=0;
int tu=0;
printf("请输入总脚数和总头数");
scanf("%d %d",&jiao,&tou);
tu=(jiao-tou*2)/2;
ji=tou-tu;
printf("鸡数是%d 兔数是%d",ji,tu);
    return 0;
}